package com.cn.shiro_jwt_redis.controller;

import com.baomidou.mybatisplus.extension.api.R;
import com.cn.shiro_jwt_redis.comm.model.ResultData;
import com.cn.shiro_jwt_redis.service.MenuService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: 张坤鹏
 * @Date: 2021/08/04/10:22
 * @Description:
 */
@RestController
public class MenuController {

    @Autowired
    private MenuService menuService;

    @GetMapping("/getLoginMenuTree")
    @RequiresPermissions("emp:add")
    public ResultData getLoginMenuTree(Integer loginId){
        return menuService.getLoginMenuTree(loginId);
    }
}
